export function useRiskAndEmr(isRisk) {
  const risk = isRisk

  const riskStatusDic = {
    riskStatus1: '未筛查',
    riskStatus2: '已筛查',
    riskStatus3: '已导入',
  }
  const riskStatusTagsInfo = {
    riskStatus1: 'danger',
    riskStatus2: 'success',
    riskStatus3: 'info',
  }

  const emrStatusDic = {
    emrStatus1: '待接诊',
    emrStatus2: '进行中',
    emrStatus3: '已完成',
  }
  const emrStatusTagsInfo = {
    emrStatus1: 'danger',
    emrStatus2: 'success',
    emrStatus3: 'info',
  }
  function useStatus(status) {
    if (risk.value) {
      return riskStatusDic['riskStatus' + status]
    } else {
      return emrStatusDic['emrStatus' + status]
    }
  }

  function useTags(status) {
    console.log('risk = ' + risk.value)
    if (risk.value) {
      return riskStatusTagsInfo['riskStatus' + status]
    } else {
      return emrStatusTagsInfo['emrStatus' + status]
    }
  }
  return {
    useStatus,
    useTags,
  }
}
